Automatic Translation of C Source Code to Eiffel
نویسندگان
چکیده
Can we reuse some of the huge code-base developed in C to take advantage of modern programming language features such as type safety, object-orientation, and contracts? This paper presents a source-to-source translation of C code into Eiffel, a modern object-oriented programming language, and the supporting tool C2Eif. The translation is completely automatic and supports the entire C language (ANSI, as well as many GNU C Compiler extensions, through CIL) as used in practice, including its usage of native system libraries and inlined assembly code. Our experiments show that C2Eif can handle C applications and libraries of significant size (such as vim and libgsl), as well as challenging benchmarks such as the GCC torture tests. The produced Eiffel code is functionally equivalent to the original C code, and takes advantage of some of Eiffel’s features to produce safe and easy-to-debug translations.
منابع مشابه
Automated Translation of Java Source Code to Eiffel
Reusability is an important software engineering concept actively advocated for the last forty years. While reusability has been addressed for systems implemented using the same programming language, it does not usually handle interoperability with different programming languages. This paper presents a solution for the reuse of Java code within Eiffel programs based on a source-to-source transl...
متن کاملProof-Transforming Compilation of Eiffel Programs
In modern development schemes the processing of programs often involves an intermediate step of translation to some intermediate bytecode, complicating the verification task. Expanding on the ideas of Proof-Carrying Code (PCC), we have built a proof-transforming compiler which translates a contract-equipped program and its proof into bytecode representing both the program and the proof; before ...
متن کاملReally Automatic Scalable Object-Oriented Reengineering
Even when implemented in a purely procedural programming language, properly designed programs possess elements of good design that are expressible through object-oriented constructs and concepts. For example, placing structured types and the procedures operating on them together in the same module achieves a weak form of encapsulation that reduces inter-module coupling. This paper presents a no...
متن کاملSome Examples of Generics in Java 1.5
The forthcoming releases of Java JDK v1.5 and C# v2.0 support generic classes (classes with generic type parameters) and generic methods. Furthermore, each also supports constrained generic types. Much has been written about generic types. In " A Comparative Study of Language Support for Generic Programming " by Garcia et al details of generic types and programming in C++, Haskell, Standard ML,...
متن کاملThe Bosco Project - A JMI-Compliant Template-based Code Generator
Bosco is a code generation tool, which goal is to accept any MOF model as parameter and follow the evolution of OMG standards. It generates the underlying model (also called repository) for any modeling language expressed in MOF. In other words, it reads XMI files and generates the corresponding source code, in different object-oriented languages (Java, Eiffel, Python, C++). In the case of Java...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1206.5648 شماره
صفحات -
تاریخ انتشار 2012